#include <stdio.h>
#include <unistd.h>
#include <signal.h>

void handler (int s) {}

unsigned int mysleep (int seconds)
{
	alarm (seconds);
	pause ();
	return (alarm(0));
}

int main (void)
{
	signal (SIGALRM, handler);
	while (1) {
		mysleep (2);
		printf ("haha..\n");
	}
	return 0;
}
